<template>
  <div class="news">
    <div v-for="(item, index) in news">
      <div class="banner">
        <div class="bannerMain">
          <p>
            <span>
              {{ item.newsTageName }}
            </span>
            <span>
              {{ item.newsTageEg }}
            </span>
          </p>
          <p>
            {{ item.newsTageDsc }}
          </p>
        </div>
      </div>
      <div class="newsMain">
        <div class="newsLeft">
          <router-link
            tag="div"
            class="newsList"
            v-for="items in item.newsLeft"
            :to="{
              path: 'newsDetail',
              query: { id: items.id },
            }"
            :key="items.id"
          >
            <div class="listItem">
              <div><img :src="items.imgUrl" class="itemImg" /></div>
              <div class="listMain">
                <div class="itemTitle">
                  <div class="titleTag">
                    {{ items.titleTag }}
                  </div>
                  <div>
                    {{ items.titleDsc }}
                  </div>
                </div>
                <div class="line"></div>
                <div class="itemContent" v-for="it in items.itemContent">
                  <p>
                    {{ it.txt }}
                  </p>
                  <p>
                    {{ it.txt1 }}
                  </p>
                </div>
                <div class="itemBottom" v-for="ite in items.itemBottom">
                  <div class="tags">
                    <div v-for="ta in ite.tags">{{ ta.tags }}</div>
                  </div>
                  <div class="itemTime">
                    <p>
                      <span v-for="time in ite.itemTime">
                        {{ time.txt }}
                      </span>
                    </p>
                    <div>
                      <img src="../static/weixin.png" alt="" />
                      <img src="../static/weibo.png" alt="" />
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </router-link>
          <div class="page">
            <div class="pageInfo"></div>
            <a-pagination v-model="current" :total="50" show-less-items />
          </div>
        </div>
        <div class="newsRight">
          <div class="newsTitle">
            <p>热门BOT</p>
            <div>
              <p>查看更多</p>
              <div class="arrow"></div>
            </div>
          </div>
          <div class="line"></div>
          <div class="hotList">
            <div v-for="(ite, index) in item.newsRight" :key="index">
              <router-link
                :to="{
                  path: 'botDetail',
                  query: { id: ite.id },
                }"
                tag="div"
                class="hotItem"
              >
                <img :src="ite.imgUrl" />
                <div>
                  <p title="Steam礼物机器人-淘宝版" class="botTitle">
                    {{ ite.name }}
                  </p>
                  <p title="" class="botContant">
                    {{ ite.depict }}
                  </p>
                </div>
              </router-link>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      current: 1,
      news: [
        {
          newsTageName: "新闻资讯",
          newsTageEg: "News",
          newsTageDsc: "行业内时事新闻",
          newsLeft: [
            {
              id: 40001,
              imgUrl: require("@/static/SteamBot.png"),
              titleTag: "资讯",
              titleDsc:
                "Steam批量发货机器人大更新：无需额度号，也能跨区批量发送steam礼物",
              itemContent: [
                {
                  txt:
                    "steam批量发货机器人可用于批量生成成品号，能够帮助商家实现高效大量囤货的机器人，减少人力成本，提高囤货效率。",
                },
              ],
              itemBottom: [
                {
                  tags: [{ tags: "sn租号" }, { tags: "sn租号管理" }],
                  itemTime: [{ txt: "02-20" }, { txt: "2021" }],
                },
              ],
            },
            {
              id: 40002,
              imgUrl: require("@/static/SteamBot.png"),
              titleTag: "资讯",
              titleDsc:
                "Steam批量发货机器人大更新：无需额度号，也能跨区批量发送steam礼物",
              itemContent: [
                {
                  txt:
                    "steam批量发货机器人可用于批量生成成品号，能够帮助商家实现高效大量囤货的机器人，减少人力成本，提高囤货效率。",
                },
              ],
              itemBottom: [
                {
                  tags: [{ tags: "sn租号" }, { tags: "sn租号管理" }],
                  itemTime: [{ txt: "01-15" }, { txt: "2021" }],
                },
              ],
            },
          ],
          newsRight: [
            {
              id: 200001,
              name: "Steam饰品机器人-淘宝版",
              depict:
                "Steam礼物机器人(淘宝版)适用于淘宝/天猫平台游戏代购店铺自动发货，帮助商家实现24小时Steam游戏代购自动发货，和每天重复上百次的发货工作说再见。",
              imgUrl: require("@/static/bot-1.png"),
            },
            {
              id: 200002,
              name: "Steam礼物机器人-激活码版",
              depict:
                "Steam礼物机器人(淘宝版)适用于淘宝/天猫平台游戏代购店铺自动发货，帮助商家实现24小时Steam游戏代购自动发货，和每天重复上百次的发货工作说再见。",
              imgUrl: require("@/static/bot-1.png"),
            },
          ],
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.news {
  background: #f5f5f5;
  width: 100%;
  min-height: 100vh;
  .banner {
    height: 372px;
    background-color: #2e2f3a;
    background-image: url(../static/xinwen.png);
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    .bannerMain {
      width: 1200px;
      p:first-child {
        font-size: 40px;
        font-family: Microsoft YaHei;
        font-weight: 700;
        color: #fff;
        span:last-child {
          font-size: 14px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #494b5a;
        }
      }
      p:last-child {
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #fff;
        margin-top: 35px;
        width: 500px;
      }
    }
  }
  .newsMain {
    width: 1200px;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 75px 0 71px;
    .newsLeft {
      width: 806px;
      .newsList {
        margin-bottom: 17px;
        .listItem {
          width: 100%;
          min-height: 230px;
          background: #fff;
          box-sizing: border-box;
          padding: 25px;
          display: flex;
          cursor: pointer;
          .itemImg {
            width: 285px;
            height: 151px;
            margin-right: 25px;
          }
          .listMain {
            width: 100%;
            max-width: 442px;
            .itemTitle {
              display: flex;
              align-items: center;
              font-size: 16px;
              font-family: Microsoft YaHei;
              font-weight: 700;
              color: #333;
              .titleTag {
                width: 39px;
                height: 20px;
                line-height: 20px;
                text-align: center;
                background: #ff7022;
                border-radius: 4px;
                font-size: 12px;
                font-family: Microsoft YaHei;
                font-weight: 400;
                color: #333;
                margin-right: 18px;
              }
            }
            .line {
              width: 100%;
              height: 1px;
              background: #e5e5e5;
              margin-top: 12px;
            }
            .itemContent {
              width: 100%;
              overflow: hidden;
              margin-top: 12px;
              height: 60px;
              font-size: 12px;
              font-family: Microsoft YaHei;
              font-weight: 400;
              color: #666;
              line-height: 21px;
            }
            .itemBottom {
              margin-top: 15px;
              display: flex;
              flex-direction: column;
              .tags {
                display: flex;
                flex-wrap: wrap;
                > div {
                  cursor: pointer;
                  min-width: 51px;
                  height: 20px;
                  border: 1px solid #ff7022;
                  border-radius: 4px;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  font-size: 12px;
                  font-family: Microsoft YaHei;
                  font-weight: 400;
                  color: #ff7022;
                  margin-right: 13px;
                  box-sizing: border-box;
                  padding: 0 10px;
                }
              }
              .itemTime {
                display: flex;
                align-items: center;
                margin-top: 5px;
                justify-content: flex-end;
                > p {
                  font-size: 27px;
                  font-family: Arial;
                  font-weight: 400;
                  color: #ccc;
                  margin: 0 19px 0 0;
                  > span:last-child {
                    font-size: 14px;
                  }
                }
                > div {
                  display: flex;
                  img {
                    width: 25px;
                    height: 25px;
                    margin-left: 9px;
                  }
                }
              }
            }
          }
        }
      }
    }
    .newsRight {
      width: 364px;
      background: #fff;
      box-sizing: border-box;
      padding: 25px 20px;
      .newsTitle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        > p {
          font-size: 15px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #282828;
        }
        > div {
          display: flex;
          font-size: 12px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #1768e4;
          cursor: pointer;
          .arrow {
            width: 0;
            height: 0;
            margin-left: 17px;
            margin-top: 4px;
            border: 4px solid transparent;
            border-left-color: #1768e4;
          }
        }
      }
      .line {
        width: 324px;
        height: 1px;
        background: #e5e5e5;
        margin-top: 19px;
      }
      .hotList {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        margin-top: 15px;
        > div {
          margin-bottom: 16px;
          .hotItem {
            width: 156px;
            min-height: 163px;
            background: #fff;
            border: 1px solid #e5e5e5;
            box-shadow: 0 2px 19px 2px #ddd;
            padding: 5px;
            box-sizing: border-box;
            cursor: pointer;
            > img {
              max-height: 146px;
              width: 100%;
            }
            > div {
              font-size: 10px;
              font-family: Microsoft YaHei;
              font-weight: 400;
              color: #999;
              p {
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
              }
              p:first-child {
                font-size: 12px;
                font-family: Microsoft YaHei;
                font-weight: 700;
                color: #111;
                margin-top: 10px;
                margin-bottom: 6px;
              }
            }
          }
        }
      }
    }
  }
  .page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
  }
}
</style>